
package com.dfiov.cloud.msmtools.enums;

public enum CarsptEnum {

    TRADITION_CAR(0, "传统"),

    MOBILE_CAR_NETWORKING(1, "车联网"),
    ;

    private Integer code;

    private String desc;

    public static String getDescByCode(Integer code) {

        if(code == null) {
            return null;
        }
        for (CarsptEnum statusEnum : values()) {
            if(statusEnum.code == code) {
                return statusEnum.desc;
            }
        }
        return null;
    }

    private CarsptEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
